package com.test.langchain4j.config;

import dev.langchain4j.model.chat.ChatModel;
import dev.langchain4j.model.openai.OpenAiChatModel;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created with IntelliJ IDEA.
 *
 * @description:
 * @author: liuziyang
 * @since: 2025/7/29 17:03
 * @modifiedBy:
 * @version: 1.0
 */
@Configuration
public class LLMConfig {
  @Bean(name = "qwen")
  public ChatModel chatModelQwen() {
    return OpenAiChatModel.builder()
        .apiKey(System.getenv("qwen-api-key"))
        .modelName("qwen-plus")
        .baseUrl("https://dashscope.aliyuncs.com/compatible-mode/v1")
        .build();
  }

  @Bean(name = "deepseek")
  public ChatModel chatModelDeepseek() {
    return OpenAiChatModel.builder()
        .apiKey(System.getenv("silicon-api-key"))
        .modelName("deepseek-ai/DeepSeek-R1-0528-Qwen3-8B")
        .baseUrl("https://api.siliconflow.cn/v1")
        .build();
  }
}
